package com.ningyue.water.service.watermeasure.impl;

import com.ningyue.water.dao.watermeasure.WaterMeasureDao;
import com.ningyue.water.entity.WaterMeasureRecordDO;
import com.ningyue.water.service.watermeasure.WaterMeasureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by steven on 16/1/5.
 */
@Service
public class WaterMeasureServiceImpl implements WaterMeasureService {

    @Autowired
    WaterMeasureDao waterMeasureDao;

    /**
     * 新增水设备测量记录
     * @param waterMeasureRecordDO
     * @return
     */
    @Override
    public Integer addWaterMeasureRecord(WaterMeasureRecordDO waterMeasureRecordDO) {
        return waterMeasureDao.insertMeasureRecord(waterMeasureRecordDO);
    }


    @Override
    public Integer deleteWaterMeasureById(Integer id) {
        return waterMeasureDao.deleteMeasureRecordById(id);
    }

    @Override
    public Integer updateWaterMeasureRecord(WaterMeasureRecordDO waterMeasureRecordDO) {
        return waterMeasureDao.updateMeasureRecord(waterMeasureRecordDO);
    }
}
